import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/svg.dart';

enum IconNames {
  weixindenglu, shoucang_11, dianzan_xuanzhong, dianzanweixuanzhong, shengqian, xinxi_1, shoucang, xiaoxi_1, shoucang_1, caidan, queshengye_zanwushuju, biaoqiankuozhan_wode_145, biaoqiankuozhan_shouye_201, xiaoxi, sousuo, daka_1, xihuancon, xinxi
}

extension parseString on IconNames {
  String serialize() => this.toString().split('.').last;
}

/// A class includes all icons which you provided from https://iconfont.cn
///
/// How to use it:
/// ```dart
/// IconFont(IconNames.xxx);
/// IconFont(IconNames.xxx, color: '#f00');
/// IconFont(IconNames.xxx, colors: ['#f00', 'blue']);
/// IconFont(IconNames.xxx, size: 30, color: '#000');
/// ```
///
/// The name is dynamic to against server interface.
/// Feel free to input string literal.
/// ```dart
/// IconFont('xxx');
/// ```
class IconFont extends StatelessWidget {
  IconNames? name;
  final String? color;
  final List<String>? colors;
  final double size;

  IconFont(dynamic iconName, { this.size = 16, this.color, this.colors }) {
    this.name = getIconNames(iconName);
  }

  static IconNames getIconNames(dynamic iconName) {
    switch (iconName) {
      case 'weixindenglu':
        iconName = IconNames.weixindenglu;
        break;
      case 'shoucang_11':
        iconName = IconNames.shoucang_11;
        break;
      case 'dianzan_xuanzhong':
        iconName = IconNames.dianzan_xuanzhong;
        break;
      case 'dianzanweixuanzhong':
        iconName = IconNames.dianzanweixuanzhong;
        break;
      case 'shengqian':
        iconName = IconNames.shengqian;
        break;
      case 'xinxi_1':
        iconName = IconNames.xinxi_1;
        break;
      case 'shoucang':
        iconName = IconNames.shoucang;
        break;
      case 'xiaoxi_1':
        iconName = IconNames.xiaoxi_1;
        break;
      case 'shoucang_1':
        iconName = IconNames.shoucang_1;
        break;
      case 'caidan':
        iconName = IconNames.caidan;
        break;
      case 'queshengye_zanwushuju':
        iconName = IconNames.queshengye_zanwushuju;
        break;
      case 'biaoqiankuozhan_wode_145':
        iconName = IconNames.biaoqiankuozhan_wode_145;
        break;
      case 'biaoqiankuozhan_shouye_201':
        iconName = IconNames.biaoqiankuozhan_shouye_201;
        break;
      case 'xiaoxi':
        iconName = IconNames.xiaoxi;
        break;
      case 'sousuo':
        iconName = IconNames.sousuo;
        break;
      case 'daka_1':
        iconName = IconNames.daka_1;
        break;
      case 'xihuancon':
        iconName = IconNames.xihuancon;
        break;
      case 'xinxi':
        iconName = IconNames.xinxi;
        break;

    }
    return iconName;
  }

  static String getColor(int arrayIndex, String? color, List<String>? colors, String defaultColor) {
    if (color != null && color.isNotEmpty) {
      return color;
    }

    if (colors != null && colors.isNotEmpty && colors.length > arrayIndex) {
      return colors.elementAt(arrayIndex);
    }

    return defaultColor;
  }

  @override
  Widget build(BuildContext context) {
    String svgXml;

    switch (this.name!) {
      case IconNames.weixindenglu:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M347.729118 353.0242c-16.487119 0-29.776737 13.389539-29.776737 29.776737S331.241998 412.677596 347.729118 412.677596s29.776737-13.389539 29.776737-29.776737-13.289617-29.876659-29.776737-29.876659zM577.749415 511.800156c-13.689305 0-24.880562 11.091335-24.880563 24.880562 0 13.689305 11.091335 24.880562 24.880563 24.880562 13.689305 0 24.880562-11.191257 24.880562-24.880562s-11.191257-24.880562-24.880562-24.880562zM500.909446 412.677596c16.487119 0 29.776737-13.389539 29.776737-29.776737s-13.389539-29.776737-29.776737-29.776737c-16.487119 0-29.776737 13.389539-29.776737 29.776737s13.289617 29.776737 29.776737 29.776737zM698.455113 511.600312c-13.689305 0-24.880562 11.091335-24.880562 24.880562 0 13.689305 11.091335 24.880562 24.880562 24.880562 13.689305 0 24.880562-11.091335 24.880562-24.880562-0.099922-13.689305-11.191257-24.880562-24.880562-24.880562z"
              fill="''' + getColor(0, color, colors, '#00C800') + '''"
            />
            <path
              d="M511.601093 0.799375C229.12178 0.799375 0.000781 229.820453 0.000781 512.399688s229.021077 511.600312 511.600312 511.600312 511.600312-229.021077 511.600312-511.600312S794.180328 0.799375 511.601093 0.799375z m-90.229508 634.504294c-27.37861 0-49.361436-5.595628-76.839969-10.991413l-76.640125 38.469945 21.882904-65.948477c-54.957065-38.370023-87.73146-87.831382-87.73146-148.084309 0-104.318501 98.722873-186.554254 219.32865-186.554255 107.815769 0 202.34192 65.648712 221.327088 153.979703-6.994536-0.799375-13.989071-1.298985-21.083529-1.298985-104.118657 0-186.454333 77.739266-186.454332 173.564403 0 15.98751 2.498048 31.275566 6.794692 45.964091-6.794692 0.599532-13.689305 0.899297-20.583919 0.899297z m323.547228 76.839969l16.48712 54.757221-60.153006-32.874317c-21.882904 5.495706-43.965652 10.991413-65.848555 10.991413-104.318501 0-186.554254-71.344262-186.554255-159.175644 0-87.631538 82.135831-159.175644 186.554255-159.175644 98.523029 0 186.254489 71.444184 186.254488 159.175644 0.099922 49.461358-32.774395 93.227166-76.740047 126.301327z"
              fill="''' + getColor(1, color, colors, '#00C800') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.shoucang_11:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M969.055 398.71c-10.185-28.878-35.828-49.663-66.935-54.24l-219.409-32.151-95.284-194.871C573.647 89.236 543.889 71 511.598 71c-32.212 0-61.93 18.236-75.749 46.449l-95.323 194.889-219.393 32.19c-31.124 4.479-56.791 25.244-66.969 54.284-10.163 29.318-2.59 61.166 19.736 83.113l161.034 158.444L197.583 859.92c-5.239 30.605 8.378 61.994 34.785 80.004 25.825 17.372 60.441 19.278 88.258 4.659l191.012-101.394 191.136 101.413c12.369 6.526 26.247 9.979 40.162 9.979 17.148 0 33.759-5.063 48.113-14.721 26.288-17.933 39.887-49.298 34.644-79.902l-37.334-219.566 161.056-158.445C971.702 459.977 979.273 428.108 969.055 398.71L969.055 398.71zM921.196 453.312 745.204 626.473l40.845 240.252c2.652 15.426-4.136 30.728-17.57 39.902-13.756 9.238-32.309 10.225-46.949 2.514L511.598 797.729 301.824 909.075c-14.799 7.794-33.374 6.749-46.948-2.408-13.576-9.253-20.36-24.579-17.712-39.998l40.867-240.215L102.056 453.29c-11.166-10.964-14.98-26.808-9.98-41.246 5.202-14.783 18.517-25.424 34.842-27.772l240.395-35.282 104.625-213.908c7.108-14.541 22.694-23.941 39.683-23.941 17.046 0 32.631 9.382 39.739 23.918l104.604 213.908 240.334 35.204c16.306 2.409 29.679 13.09 34.863 27.793C936.178 426.481 932.363 442.305 921.196 453.312L921.196 453.312zM921.196 453.312"
              fill="''' + getColor(0, color, colors, '#333333') + '''"
            />
            <path
              d="M508.928 392.301c-41.126 0-74.264 12.554-98.441 37.273-40.36 41.267-39.499 101.209-39.44 103.757 0.242 10.93 9.181 19.602 20.064 19.602l0.379 0c11.064-0.202 19.86-9.354 19.703-20.42 0-0.461-0.363-46.07 28.193-75.048 16.324-16.584 39.741-24.978 69.521-24.978 11.088 0 20.081-8.996 20.081-20.083S520.012 392.301 508.928 392.301L508.928 392.301zM508.928 392.301"
              fill="''' + getColor(1, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.dianzan_xuanzhong:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M859.2 429.2H638.3c85.6-316.3-59-332.5-59-332.5-61.3 0-48.6 48.5-53.2 56.6C526.1 308 362 429.2 362 429.2v438.7c0 43.3 59 58.9 82.1 58.9h331.8c31.2 0 56.7-82 56.7-82 82.1-279.4 82.1-362.5 82.1-362.5 0-57.7-55.5-53.1-55.5-53.1z m-587.9 0.1H139.1c-27.3 0-27.7 26.8-27.7 26.8l27.3 442.4c0 28.2 28.2 28.2 28.2 28.2h114.5c23.8 0 23.6-18.6 23.6-18.6V462.9c-0.1-34-33.7-33.6-33.7-33.6z"
              fill="''' + getColor(0, color, colors, '#1296db') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.dianzanweixuanzhong:
        svgXml = '''
          <svg viewBox="0 0 1094 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M619.247 70.112c25.618 0 47.728 19.099 53.772 46.446l3.646 15.754c4.051 23.434 6.1 47.131 6.1 70.661 0 58.082-5.537 102.843-16.925 136.841l-29.79 88.936 93.793 0.393c90.526 0.38 228.205 1.028 241.476 1.284 23.715 1.013 33.058 9.105 41.14 22.669 8.247 13.885 9.653 27.758 9.227 37.505-6.149 38.161-82.097 380.609-94.847 432.191-4.701 8.14-11.044 14.998-18.443 19.931-12.765 8.451-13.601 8.451-19.403 8.451l-549.453 0.03 0.765-498.446c132.818-41.54 229.44-164.436 233.263-306.957l0.1-3.724-0.203-2.467 0.033-1.459 0.095-5.828c0-29.962 14.289-62.21 45.654-62.21zM163.705 468.285V951.47H72.603V468.285h91.102zM619.247 2.316c-68.07 0-113.451 58.996-113.451 130.007 0 3.998-0.32 7.83 0 11.66-3.563 132.789-108.436 239.54-233.205 254.18l-0.952 620.842h12.178c-0.016-0.02 0.129-0.033 0.567-0.033 0.455 0 0.596 0.012 0.58 0.033l604.034-0.033h0.38c22.8 0 35.677-5.971 56.442-19.718 19.796-13.2 34.767-31.25 44.521-51.655 2.703-4.097 96.473-425.389 98.87-450.385 1.874-26.66-3.911-54.24-18.465-78.741-22.945-38.521-56.284-54.08-96.614-55.784-2.094-0.327-244.004-1.341-244.004-1.341 16.018-47.822 20.433-104.82 20.433-158.374 0-34.75-3.782-68.553-10.743-101.115l-0.6 0.066c-12.61-57.058-61.489-99.609-119.971-99.609zM183.832 400.49H52.476c-26.346 0-47.67 22.01-47.67 49.134v520.513c0 27.121 21.324 49.13 47.67 49.13h131.356c26.347 0 47.67-22.009 47.67-49.13V449.624c0-27.124-21.323-49.135-47.67-49.135z m101.137 618.517h-1.147c0.013 0.016 0.112 0.037 0.244 0.066-0.095 0.037-0.091 0.053 0 0.053 0.067 0 0.178-0.009 0.323-0.02 0.158 0.013 0.277 0.02 0.344 0.02 0.103 0 0.111-0.016 0-0.053 0.128-0.03 0.223-0.05 0.236-0.066z"
              fill="''' + getColor(0, color, colors, '#8A8A8A') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.shengqian:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M932.987763 96 720.625878 96C670.569149 96 600.654688 124.958956 565.258512 160.355132L208.570182 517.043462C173.175902 552.437741 173.175902 610.357549 208.570182 645.753725L474.246275 911.426026C509.640554 946.822202 567.560362 946.822202 602.956538 911.426026L959.641075 554.741488C995.041043 519.345312 1024 449.430851 1024 399.374122L1024 187.012236C1024 136.955506 983.044493 96 932.987763 96L932.987763 96ZM811.638115 399.374122C761.372816 399.374122 720.625878 358.627184 720.625878 308.361884 720.625878 258.096585 761.372816 217.349648 811.638115 217.349648 861.903414 217.349648 902.650352 258.096585 902.650352 308.361884 902.650352 358.627184 861.903414 399.374122 811.638115 399.374122L811.638115 399.374122ZM74.653261 602.847142 399.242714 927.436595C364.862842 945.60112 321.065098 940.273114 292.221804 911.426026L26.54571 645.753725C-8.84857 610.357549-8.84857 552.437741 26.54571 517.043462L383.234038 160.355132C418.630214 124.958956 488.544678 96 538.601408 96L74.653261 559.94625C62.8558 571.745606 62.8558 591.049683 74.653261 602.847142L74.653261 602.847142Z"
              fill="''' + getColor(0, color, colors, '#bfbfbf') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.xinxi_1:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M191.825 155.411h639.133c31.777 0 60.641 12.979 81.549 33.885 20.908 20.908 33.886 49.78 33.886 81.547v386.981c0 31.773-12.978 60.642-33.886 81.55s-49.771 33.881-81.549 33.881H617.095c-51.358 65.264-86.005 97.265-115.505 96.842-34.341-0.48-51.522-33.026-64.004-96.842h-245.76c-31.77 0-60.641-12.973-81.547-33.881-20.908-20.908-33.885-49.776-33.885-81.55v-386.98c0-31.767 12.977-60.639 33.885-81.547 20.905-20.907 49.776-33.886 81.546-33.886zM321.3 397.295h4.778c26.955 0 48.999 22.043 48.999 48.999v0.006c0 26.955-22.043 49.005-48.999 49.005H321.3c-26.955 0-48.999-22.05-48.999-49.005v-0.006c0-26.955 22.044-48.999 48.999-48.999z m370.743 0h4.777c26.956 0 48.999 22.043 48.999 48.999v0.006c0 26.955-22.043 49.005-48.999 49.005h-4.777c-26.955 0-48.998-22.05-48.998-49.005v-0.006c0-26.955 22.043-48.999 48.998-48.999z m-188.393 0h4.779c26.953 0 48.997 22.043 48.997 48.999v0.006c0 26.955-22.044 49.005-48.997 49.005h-4.779c-26.953 0-48.999-22.05-48.999-49.005v-0.006c0-26.955 22.046-48.999 48.999-48.999z m327.308-190.478H191.825c-17.576 0-33.59 7.215-45.2 18.827-11.614 11.612-18.827 27.626-18.827 45.2v386.981c0 17.58 7.213 33.589 18.827 45.202 11.61 11.614 27.625 18.825 45.2 18.825H480.773l3.555 21.583c8.232 49.979 13.602 75.405 17.866 75.462 11.309 0.163 36.949-28.559 82.164-87.002l7.764-10.043h238.836c17.583 0 33.592-7.211 45.202-18.825 11.613-11.613 18.828-27.622 18.828-45.202V270.844c0-17.574-7.215-33.588-18.828-45.2-11.61-11.612-27.619-18.827-45.202-18.827z"
              fill="''' + getColor(0, color, colors, '#999999') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.shoucang:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M509.606998 143.114488c9.082866 0 17.327644 4.840238 20.996197 12.331863l97.262184 197.441814c5.613858 11.403724 16.663518 19.358907 29.438473 21.216207l223.738737 32.552393c8.420787 1.215688 15.604396 6.851035 18.23327 14.254655 2.520403 7.18361 0.595564 15.062044-5.084808 20.586874L730.253304 601.611947c-8.949836 8.751315-12.994965 21.171182-10.916631 33.370015l38.011732 222.060515c1.325182 7.737218-2.165316 15.426341-8.905834 19.978007-4.088108 2.741437-8.861832 4.155646-13.812587 4.155646-4.022617 0-7.999185-0.972141-11.425214-2.740414L528.149307 775.671215c-5.768377-3.006474-12.155854-4.552689-18.542308-4.552689-6.364965 0-12.727882 1.547239-18.518772 4.552689L296.254819 878.348736c-3.559059 1.855254-7.602142 2.828418-11.668761 2.828418-4.861728 0-9.723455-1.459235-13.546527-4.022617-6.961552-4.684696-10.475586-12.419867-9.127891-20.155039l38.011732-222.016513c2.078335-12.198833-1.988284-24.619724-10.939143-33.370015L125.02397 441.443038c-5.635347-5.492084-7.55814-13.348006-5.061272-20.453844 2.63092-7.481392 9.812483-13.116739 18.298761-14.332427l223.674269-32.552393c12.839423-1.857301 23.867594-9.813506 29.481452-21.216207l97.194646-197.396789C492.325403 147.965983 500.590648 143.114488 509.606998 143.114488M509.606998 104.904235c-24.043602 0-45.922912 13.226233-56.177464 33.95637L356.189863 336.302419l-223.674269 32.54216c-22.983457 3.304256-42.100864 18.718317-49.481971 39.659255-7.381108 21.048385-1.812275 44.23241 14.431687 60.033281l163.916257 160.125931-38.011732 222.016513c-3.868097 22.408359 6.03239 44.819788 25.458835 57.94676 10.69662 7.116071 23.204491 10.784624 35.757388 10.784624 10.298554 0 20.663622-2.475378 30.055526-7.337105l194.987926-102.7205L704.662463 912.072815c9.369392 4.861728 19.712971 7.337105 29.990035 7.337105 12.57541 0 25.082258-3.668553 35.778878-10.784624 19.426445-13.126972 29.305443-35.538401 25.460882-57.94676l-38.012755-222.016513 163.937746-160.125931c16.22145-15.812127 21.810748-38.984896 14.408151-60.033281-7.402597-20.940938-26.51898-36.353976-49.503461-39.659255L663.04767 336.302419l-97.240695-197.441814C555.619962 118.131491 533.695626 104.904235 509.606998 104.904235L509.606998 104.904235z"
              fill="''' + getColor(0, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.xiaoxi_1:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M821.333333 800H547.584l-86.464 96.074667a32 32 0 1 1-47.573333-42.816l96-106.666667A32 32 0 0 1 533.333333 736h288a53.333333 53.333333 0 0 0 53.333334-53.333333V234.666667a53.333333 53.333333 0 0 0-53.333334-53.333334H202.666667a53.333333 53.333333 0 0 0-53.333334 53.333334v448a53.333333 53.333333 0 0 0 53.333334 53.333333h138.666666a32 32 0 0 1 0 64H202.666667c-64.8 0-117.333333-52.533333-117.333334-117.333333V234.666667c0-64.8 52.533333-117.333333 117.333334-117.333334h618.666666c64.8 0 117.333333 52.533333 117.333334 117.333334v448c0 64.8-52.533333 117.333333-117.333334 117.333333zM704 341.333333a32 32 0 0 1 0 64H320a32 32 0 0 1 0-64h384zM512 512a32 32 0 0 1 0 64H320a32 32 0 0 1 0-64h192z"
              fill="''' + getColor(0, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.shoucang_1:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M335.008 916.629333c-35.914667 22.314667-82.88 10.773333-104.693333-25.557333a77.333333 77.333333 0 0 1-8.96-57.429333l46.485333-198.24a13.141333 13.141333 0 0 0-4.021333-12.864l-152.16-132.586667c-31.605333-27.52-35.253333-75.648-8.234667-107.733333a75.68 75.68 0 0 1 51.733333-26.752L354.848 339.2c4.352-0.362667 8.245333-3.232 10.026667-7.594667l76.938666-188.170666c16.032-39.2 60.618667-57.92 99.52-41.461334a76.309333 76.309333 0 0 1 40.832 41.461334l76.938667 188.16c1.781333 4.373333 5.674667 7.253333 10.026667 7.605333l199.712 16.277333c41.877333 3.413333 72.885333 40.458667 69.568 82.517334a76.938667 76.938667 0 0 1-26.08 51.978666l-152.16 132.586667c-3.541333 3.082667-5.141333 8.074667-4.021334 12.853333l46.485334 198.24c9.621333 41.013333-15.36 82.336-56.138667 92.224a75.285333 75.285333 0 0 1-57.525333-9.237333l-170.976-106.24a11.296 11.296 0 0 0-12.010667 0l-170.986667 106.24z"
              fill="''' + getColor(0, color, colors, '#ffbb44') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.caidan:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M320 288.13h0.07l607.13-1.34c17.67-0.04 31.97-14.4 31.93-32.07-0.04-17.65-14.36-31.93-32-31.93h-0.07l-607.13 1.34c-17.67 0.04-31.97 14.4-31.93 32.07 0.04 17.65 14.36 31.93 32 31.93zM112.02 304c26.51 0 48-21.49 48-48s-21.49-48-48-48-48 20.15-48 46.66c0 26.51 21.49 49.34 48 49.34zM320 544l607.13-0.06c17.67 0 32-14.33 32-32s-14.33-32-32-32L320 480c-17.67 0-32 14.33-32 32s14.33 32 32 32zM112.01 560c26.51 0 47.98-20.96 47.98-47.47 0-26.51-21.47-48.53-47.98-48.53-26.51 0-48 21.49-48 48s21.49 48 48 48zM929.53 736H320c-17.67 0-32 14.33-32 32s14.33 32 32 32h609.53c17.67 0 32-14.33 32-32s-14.32-32-32-32z"
              fill="''' + getColor(0, color, colors, '#333333') + '''"
            />
            <path
              d="M112.02 769.53m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z"
              fill="''' + getColor(1, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.queshengye_zanwushuju:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M102.4 896a409.6 51.2 0 1 0 819.2 0 409.6 51.2 0 1 0-819.2 0Z"
              fill="''' + getColor(0, color, colors, '#4A68CC') + '''"
              opacity=".1"
            />
            <path
              d="M116.736 376.832c0 8.704 6.656 15.36 15.36 15.36s15.36-6.656 15.36-15.36-6.656-15.36-15.36-15.36c-8.192 0-15.36 7.168-15.36 15.36zM926.72 832c-19.456 5.12-23.552 9.216-28.16 28.16-5.12-19.456-9.216-23.552-28.16-28.16 18.944-5.12 23.552-9.216 28.16-28.16 4.608 18.944 8.704 23.552 28.16 28.16zM202.24 323.072c-25.088 6.656-30.208 11.776-36.864 36.864-6.656-25.088-11.776-30.208-36.864-36.864 25.088-6.656 30.208-12.288 36.864-36.864 6.144 25.088 11.776 30.208 36.864 36.864zM816.64 235.008c-15.36 4.096-18.432 7.168-22.528 22.528-4.096-15.36-7.168-18.432-22.528-22.528 15.36-4.096 18.432-7.168 22.528-22.528 3.584 15.36 7.168 18.432 22.528 22.528zM882.688 156.16c-39.936 10.24-48.128 18.944-58.88 58.88-10.24-39.936-18.944-48.128-58.88-58.88 39.936-10.24 48.128-18.944 58.88-58.88 10.24 39.424 18.944 48.128 58.88 58.88z"
              fill="''' + getColor(1, color, colors, '#4A68CC') + '''"
              opacity=".5"
            />
            <path
              d="M419.84 713.216v4.096l33.792 31.232 129.536-62.976L465.92 760.832v36.864l18.944-18.432v-0.512 0.512l18.944 18.432 100.352-122.88v-4.096z"
              fill="''' + getColor(2, color, colors, '#4A68CC') + '''"
              opacity=".2"
            />
            <path
              d="M860.16 551.936v-1.024c0-1.024-0.512-1.536-0.512-2.56v-0.512l-110.08-287.232c-15.872-48.64-60.928-81.408-112.128-81.408H387.072c-51.2 0-96.256 32.768-112.128 81.408L164.864 547.84v0.512c-0.512 1.024-0.512 1.536-0.512 2.56V757.76c0 65.024 52.736 117.76 117.76 117.76h460.8c65.024 0 117.76-52.736 117.76-117.76v-204.8c-0.512-0.512-0.512-0.512-0.512-1.024zM303.616 271.36s0-0.512 0.512-0.512C315.392 233.984 349.184 209.92 387.072 209.92h249.856c37.888 0 71.68 24.064 83.456 60.416 0 0 0 0.512 0.512 0.512l101.888 266.24H588.8c-8.704 0-15.36 6.656-15.36 15.36 0 33.792-27.648 61.44-61.44 61.44s-61.44-27.648-61.44-61.44c0-8.704-6.656-15.36-15.36-15.36H201.728L303.616 271.36zM829.44 757.76c0 48.128-38.912 87.04-87.04 87.04H281.6c-48.128 0-87.04-38.912-87.04-87.04v-189.44h226.816c7.168 43.52 45.056 76.8 90.624 76.8s83.456-33.28 90.624-76.8H829.44v189.44z"
              fill="''' + getColor(3, color, colors, '#4A68CC') + '''"
              opacity=".5"
            />
            <path
              d="M512 578.56c-14.336 0-25.6-11.264-25.6-25.6V501.76H253.44l83.968-219.136 0.512-1.024c7.168-21.504 26.624-35.84 49.152-35.84h249.856c22.528 0 41.984 14.336 49.152 35.84l0.512 1.024L770.56 501.76H537.6v51.2c0 14.336-11.264 25.6-25.6 25.6z"
              fill="''' + getColor(4, color, colors, '#4A68CC') + '''"
              opacity=".2"
            />
          </svg>
        ''';
        break;
      case IconNames.biaoqiankuozhan_wode_145:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M503.3472 492.1344c104.0896 0 188.7744-84.6848 188.7744-188.7744s-84.6848-188.7744-188.7744-188.7744-188.7744 84.6848-188.7744 188.7744 84.6848 188.7744 188.7744 188.7744z"
              fill="''' + getColor(0, color, colors, '#9296bf') + '''"
            />
            <path
              d="M150.3744 706.4064a352.9728 197.888 0 1 0 705.9456 0 352.9728 197.888 0 1 0-705.9456 0Z"
              fill="''' + getColor(1, color, colors, '#9296bf') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.biaoqiankuozhan_shouye_201:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M834.304 484.2496c-14.1312 0-25.6-11.4688-25.6-25.6V199.0144c0-17.2544-14.0288-31.2832-31.2832-31.2832h-104.8064c-17.2544 0-31.2832 14.0288-31.2832 31.2832 0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6c0-45.4656 37.0176-82.4832 82.4832-82.4832h104.8064c45.4656 0 82.4832 37.0176 82.4832 82.4832v259.6352c0 14.1312-11.4176 25.6-25.6 25.6z"
              fill="''' + getColor(0, color, colors, '#9296bf') + '''"
            />
            <path
              d="M901.0688 589.4144l-0.512-1.9968c-26.9312-110.336-64.512-188.0064-91.2384-233.7792-76.5952-130.9696-180.1216-200.2432-299.3152-200.2432-285.8496 0-397.5168 406.3232-406.8864 484.0448-12.6464 69.4272-1.2288 126.0544 33.8944 168.2432 75.4176 90.624 240.5888 91.5456 362.7008 91.5456h7.3728c114.4832 0 287.488 0 365.9776-100.096 39.936-50.8928 49.3056-120.7808 28.0064-207.7184z"
              fill="''' + getColor(1, color, colors, '#9296bf') + '''"
            />
            <path
              d="M511.9488 734.8224c-4.352 0-8.7552-0.1024-13.1072-0.3584-132.4544-7.3216-217.7536-123.4432-221.3376-128.4096a25.57952 25.57952 0 0 1 5.7856-35.7376 25.66144 25.66144 0 0 1 35.7376 5.7344c1.1264 1.5872 75.4176 101.5296 183.04 107.3152 70.144 3.6352 140.8-33.0752 209.92-109.4656a25.53856 25.53856 0 0 1 36.1472-1.792c10.496 9.472 11.264 25.7024 1.792 36.1472-76.0832 84.0192-156.1088 126.5664-237.9776 126.5664z"
              fill="''' + getColor(2, color, colors, '#ffffff') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.xiaoxi:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M476.1088 820.6848h178.5856c1.536 0 3.0208 0.4096 4.352 1.1776l148.7872 86.016c14.7456 8.4992 33.1776-2.0992 33.2288-19.0976l0.1536-59.392c0-4.8128 3.8912-8.6528 8.704-8.6528h-6.2976c75.5712 0 136.8576-61.2864 136.8576-136.8576V404.1728c0-75.5712-61.2864-136.8576-136.8576-136.8576H476.1088c-75.5712 0-136.8576 61.2864-136.8576 136.8576v279.7056c0 75.5712 61.2864 136.8064 136.8576 136.8064z"
              fill="''' + getColor(0, color, colors, '#9296bf') + '''"
            />
            <path
              d="M723.456 712.4992H423.8336c-1.536 0-3.0208 0.4096-4.352 1.1776l-148.7872 86.016c-14.7456 8.4992-33.1776-2.0992-33.2288-19.0976l-0.1536-59.392c0-4.8128-3.8912-8.6528-8.704-8.6528h-41.0624c-75.5712 0-136.8576-61.2864-136.8576-136.8576V265.2672c0-75.5712 61.2864-136.8576 136.8576-136.8576H723.456c75.5712 0 136.8576 61.2864 136.8576 136.8576v310.4256c-0.0512 75.5712-61.2864 136.8064-136.8576 136.8064z"
              fill="''' + getColor(1, color, colors, '#9296bf') + '''"
            />
            <path
              d="M476.1088 267.3152c-75.5712 0-136.8576 61.2864-136.8576 136.8576v279.7056c0 24.064 6.2464 46.6432 17.1008 66.2528l63.0784-36.4544c1.3312-0.768 2.816-1.1776 4.352-1.1776h299.6224c75.5712 0 136.8576-61.2864 136.8576-136.8576V295.9872c0-9.5744 0.1536-17.5616 0-27.5456-4.5568-0.4608-11.9808-1.0752-16.64-1.0752H476.1088z"
              fill="''' + getColor(2, color, colors, '#212f7e') + '''"
            />
            <path
              d="M250.624 403.9168m-56.9344 0a56.9344 56.9344 0 1 0 113.8688 0 56.9344 56.9344 0 1 0-113.8688 0Z"
              fill="''' + getColor(3, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M458.3424 403.9168m-56.9344 0a56.9344 56.9344 0 1 0 113.8688 0 56.9344 56.9344 0 1 0-113.8688 0Z"
              fill="''' + getColor(4, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M668.3136 403.9168m-56.9344 0a56.9344 56.9344 0 1 0 113.8688 0 56.9344 56.9344 0 1 0-113.8688 0Z"
              fill="''' + getColor(5, color, colors, '#ffffff') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.sousuo:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M525.6 465m-194.7 0a194.7 194.7 0 1 0 389.4 0 194.7 194.7 0 1 0-389.4 0Z"
              fill="''' + getColor(0, color, colors, '#9296bf') + '''"
            />
            <path
              d="M492.4 695.7c-139.6 0-253.1-113.5-253.1-253.1s113.5-253.1 253.1-253.1S745.5 303 745.5 442.6 632 695.7 492.4 695.7z m0-461.4c-114.9 0-208.4 93.5-208.4 208.4C284 557.5 377.5 651 492.4 651s208.4-93.5 208.4-208.4-93.5-208.3-208.4-208.3z"
              fill="''' + getColor(1, color, colors, '#212f7e') + '''"
            />
            <path
              d="M835.2 794.7c-13 13-34.1 13-47.1 0L619.9 626.4l47.1-47.1 168.3 168.3c13 13 13 34.1-0.1 47.1z"
              fill="''' + getColor(2, color, colors, '#212f7e') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.daka_1:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M785.408 931.328h-547.84c-94.2592 0-170.7008-76.3904-170.7008-170.7008V355.4304c0-94.2592 76.3904-170.7008 170.7008-170.7008h547.84c94.2592 0 170.7008 76.3904 170.7008 170.7008v405.248c0 94.2592-76.3904 170.6496-170.7008 170.6496z"
              fill="''' + getColor(0, color, colors, '#4058E2') + '''"
            />
            <path
              d="M752.5376 879.7184H270.4896c-94.2592 0-170.7008-76.3904-170.7008-170.7008V383.0272c0-94.2592 76.3904-170.7008 170.7008-170.7008h482.048c94.2592 0 170.7008 76.3904 170.7008 170.7008v325.9904c0 94.2592-76.4416 170.7008-170.7008 170.7008z"
              fill="''' + getColor(1, color, colors, '#5565E9') + '''"
            />
            <path
              d="M718.1312 833.9456h-413.184c-94.2592 0-170.7008-76.3904-170.7008-170.7008v-260.096c0-94.2592 76.3904-170.7008 170.7008-170.7008h413.184c94.2592 0 170.7008 76.3904 170.7008 170.7008v260.096c-0.0512 94.3104-76.4416 170.7008-170.7008 170.7008z"
              fill="''' + getColor(2, color, colors, '#6675FE') + '''"
            />
            <path
              d="M685.1584 790.8352H337.8688c-94.2592 0-170.7008-76.3904-170.7008-170.7008V429.4656c0-94.2592 76.3904-170.7008 170.7008-170.7008h347.3408c94.2592 0 170.7008 76.3904 170.7008 170.7008v190.6688c-0.0512 94.2592-76.4928 170.7008-170.752 170.7008z"
              fill="''' + getColor(3, color, colors, '#7084FC') + '''"
            />
            <path
              d="M785.408 184.7296h-547.84c-94.2592 0-170.7008 76.3904-170.7008 170.7008v79.8208h889.1904V355.4304c0.0512-94.2592-76.3392-170.7008-170.6496-170.7008z"
              fill="''' + getColor(4, color, colors, '#4058E2') + '''"
            />
            <path
              d="M765.184 207.7696H257.8432c-87.296 0-158.0544 62.3616-158.0544 139.264V412.16h823.3984V347.0848c0.0512-76.9536-70.7072-139.3152-158.0032-139.3152z"
              fill="''' + getColor(5, color, colors, '#5565E9') + '''"
            />
            <path
              d="M743.936 240.128H279.04c-79.9744 0-144.8448 42.5984-144.8448 95.1808v44.544h754.5344v-44.544c0.0512-52.5312-64.768-95.1808-144.7936-95.1808z"
              fill="''' + getColor(6, color, colors, '#6675FE') + '''"
            />
            <path
              d="M723.6608 267.6224H299.3664c-73.0112 0-132.1984 25.856-132.1984 57.8048v27.0336h688.6912v-27.0336c0-31.9488-59.1872-57.8048-132.1984-57.8048z"
              fill="''' + getColor(7, color, colors, '#7084FC') + '''"
            />
            <path
              d="M276.7872 184.7296v102.7584c0 39.424 32.0512 71.4752 71.4752 71.4752s71.4752-32.0512 71.4752-71.4752V184.7296H276.7872zM612.7616 184.7296v102.7584c0 39.424 32.0512 71.4752 71.4752 71.4752s71.4752-32.0512 71.4752-71.4752V184.7296h-142.9504z"
              fill="''' + getColor(8, color, colors, '#4058E2') + '''"
            />
            <path
              d="M348.2624 338.7392c-28.2624 0-51.2-22.9376-51.2-51.2V150.9376c0-28.2624 22.9376-51.2 51.2-51.2s51.2 22.9376 51.2 51.2v136.6016c0 28.2624-22.9376 51.2-51.2 51.2z"
              fill="''' + getColor(9, color, colors, '#F2BB33') + '''"
            />
            <path
              d="M348.2624 320.8192a33.28 33.28 0 0 1-33.28-33.28V150.9376a33.28 33.28 0 1 1 66.56 0v136.6016a33.28 33.28 0 0 1-33.28 33.28z"
              fill="''' + getColor(10, color, colors, '#F7CA44') + '''"
            />
            <path
              d="M348.2624 302.8992c-8.4992 0-15.36-6.8608-15.36-15.36V150.9376c0-8.4992 6.8608-15.36 15.36-15.36s15.36 6.8608 15.36 15.36v136.6016c0 8.4992-6.912 15.36-15.36 15.36z"
              fill="''' + getColor(11, color, colors, '#FDF2B1') + '''"
            />
            <path
              d="M684.1856 338.7392c-28.2624 0-51.2-22.9376-51.2-51.2V150.9376c0-28.2624 22.9376-51.2 51.2-51.2s51.2 22.9376 51.2 51.2v136.6016c0 28.2624-22.8864 51.2-51.2 51.2z"
              fill="''' + getColor(12, color, colors, '#F2BB33') + '''"
            />
            <path
              d="M684.1856 320.8192a33.28 33.28 0 0 1-33.28-33.28V150.9376a33.28 33.28 0 1 1 66.56 0v136.6016a33.28 33.28 0 0 1-33.28 33.28z"
              fill="''' + getColor(13, color, colors, '#F7CA44') + '''"
            />
            <path
              d="M684.1856 302.8992c-8.4992 0-15.36-6.8608-15.36-15.36V150.9376c0-8.4992 6.8608-15.36 15.36-15.36s15.36 6.8608 15.36 15.36v136.6016c0 8.4992-6.8608 15.36-15.36 15.36z"
              fill="''' + getColor(14, color, colors, '#FDF2B1') + '''"
            />
            <path
              d="M713.9328 523.008a89.25184 89.25184 0 0 0-58.0608-36.5056c-23.6032-3.9936-47.36 1.4336-66.8672 15.2576L487.424 573.952l-17.7664-31.6928c-24.1664-43.0592-78.848-58.4704-121.9584-34.3552-43.1104 24.1664-58.4704 78.8992-34.3552 121.9584l66.5088 118.6304c12.3904 22.1184 33.7408 38.0416 58.4704 43.5712 6.4512 1.4336 13.056 2.2016 19.6608 2.2016 18.688 0 36.608-5.7344 51.8656-16.5376l182.8864-129.792c40.2944-28.5696 49.8176-84.6336 21.1968-124.928z"
              fill="''' + getColor(15, color, colors, '#4058E2') + '''"
            />
            <path
              d="M457.984 760.9856a56.39168 56.39168 0 0 1-49.152-28.7744l-66.5088-118.6304c-15.2064-27.136-5.5296-61.44 21.6064-76.6464 27.136-15.2064 61.44-5.5296 76.6464 21.6064l35.84 64 131.7888-93.5424c25.344-18.0224 60.5184-12.032 78.5408 13.312 18.0224 25.344 12.032 60.5184-13.312 78.5408L490.5984 750.592a56.13056 56.13056 0 0 1-32.6144 10.3936z"
              fill="''' + getColor(16, color, colors, '#F2BB33') + '''"
            />
            <path
              d="M457.984 740.5056a35.76832 35.76832 0 0 1-31.2832-18.3296l-66.5088-118.6304a35.84 35.84 0 0 1 62.5152-35.072l47.0016 83.8656 150.3744-106.7008a35.80416 35.80416 0 0 1 49.9712 8.4992 35.80416 35.80416 0 0 1-8.4992 49.9712L478.72 733.9008a35.6608 35.6608 0 0 1-20.736 6.6048z"
              fill="''' + getColor(17, color, colors, '#F7CA44') + '''"
            />
            <path
              d="M457.984 722.5856c-1.3312 0-2.6112-0.1536-3.9424-0.4096-4.9664-1.1264-9.216-4.3008-11.6736-8.704l-66.5088-118.6304a17.88416 17.88416 0 0 1 6.8608-24.3712c8.6016-4.8128 19.5584-1.792 24.3712 6.8608l56.7296 101.2224 166.656-118.272c8.0896-5.7344 19.2512-3.84 24.9856 4.2496s3.84 19.2512-4.2496 24.9856l-182.8864 129.792c-3.0208 2.1504-6.656 3.2768-10.3424 3.2768z"
              fill="''' + getColor(18, color, colors, '#FDF2B1') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.xihuancon:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M710.081381 161.857365c-73.186859 0-141.086295 36.529985-182.074825 96.652294-40.953737-60.123332-108.853174-96.652294-182.042079-96.652294-121.771391 0-220.839711 99.872638-220.839711 222.63459 0 8.113795 0.562818 16.822131 1.65264 25.850761 1.955538 32.42448 30.151717 205.677383 394.274762 433.800987 2.162246 1.349741 4.613064 2.023076 7.05365 2.023076 2.456958 0 4.913916-0.679475 7.075139-2.043542 366.443903-230.610238 392.854413-401.844158 394.327974-435.131285 0.944512-8.659217 1.39886-16.678868 1.39886-24.50102C930.908812 261.730003 831.846632 161.857365 710.081381 161.857365zM903.093303 406.54011c-0.033769 0.310062-0.047072 0.626263-0.066515 0.942465-0.704035 18.123776-17.175171 182.659133-374.939391 409.797293C181.660386 598.332251 155.055448 438.697507 153.182798 407.999344c-1.044796-8.871041-1.540076-16.344247-1.540076-23.506367 0-108.164488 87.169315-196.172915 194.322777-196.172915 70.906933 0 136.195915 39.051411 170.389692 101.906971 2.321882 4.263094 6.792707 6.91448 11.651364 6.91448 4.866844 0 9.337669-2.651386 11.659551-6.91448 34.208103-62.85556 99.511411-101.906971 170.416298-101.906971 107.141182 0 194.310497 88.008426 194.310497 196.172915C904.391878 391.467833 903.963113 398.687258 903.093303 406.54011zM322.066183 271.720541c-57.105602 0-103.566774 46.851051-103.566774 104.436584 0 3.814886 0.267083 7.899924 0.808412 12.487406 0.260943 2.24411 2.169409 3.89982 4.378727 3.89982 0.172939 0 0.354064-0.00921 0.528026-0.033769 2.423189-0.285502 4.15667-2.473331 3.869121-4.89345-0.50142-4.239558-0.743944-7.985882-0.743944-11.460006 0-52.720735 42.487673-95.609545 94.726431-95.609545 2.441609 0 4.423753-1.969864 4.423753-4.41045C326.489936 273.700639 324.507792 271.720541 322.066183 271.720541z"
              fill="''' + getColor(0, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.xinxi:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M507.297959 862.040816c-52.244898 0-102.922449-9.404082-151.510204-27.689796l-116.506122 25.6c-24.032653 5.22449-46.497959 0-60.604082-14.628571-14.628571-14.628571-19.853061-36.571429-14.628571-60.604082l17.240816-77.844898c-43.363265-57.469388-66.35102-122.77551-66.35102-190.693877C114.938776 320.783673 291.004082 161.959184 507.297959 161.959184c107.62449 0 208.457143 36.04898 283.689796 101.877551C867.265306 330.710204 909.061224 420.04898 909.061224 516.179592c0 190.693878-180.244898 345.861224-401.763265 345.861224z"
              fill="''' + getColor(0, color, colors, '#7BD4EF') + '''"
            />
            <path
              d="M512 581.485714c-38.138776 0-69.485714-31.346939-69.485714-69.485714s31.346939-69.485714 69.485714-69.485714 69.485714 31.346939 69.485714 69.485714-31.346939 69.485714-69.485714 69.485714zM710.530612 581.485714c-38.138776 0-69.485714-31.346939-69.485714-69.485714s31.346939-69.485714 69.485714-69.485714 69.485714 31.346939 69.485715 69.485714-31.346939 69.485714-69.485715 69.485714zM313.469388 581.485714c-38.138776 0-69.485714-31.346939-69.485715-69.485714s31.346939-69.485714 69.485715-69.485714 69.485714 31.346939 69.485714 69.485714-31.346939 69.485714-69.485714 69.485714z"
              fill="''' + getColor(1, color, colors, '#278DCA') + '''"
            />
          </svg>
        ''';
        break;

    }

    return SvgPicture.string(svgXml, width: this.size, height: this.size);
  }
}
